function ctrlInitArrowFormDate(context,selector, data){
	var container = $(selector, context);
	
	var update = function( el ){
		var cont = el.parent();
		var date = $(".ctrl-form-date-date", cont ).val();
		if(cont.find(".ctrl-form-date-hour" ))
			var hour = $(".ctrl-form-date-hour",cont ).val();
		
		if(cont.find(".ctrl-form-date-minutes" ))
			var minutes = $(".ctrl-form-date-minutes",cont ).val();
		
		date = date.split("-");
		
		val = date[2] + "-" + date[1] + "-" + date[0];
		
		if(hour != undefined)
			val+= " " + hour + ":" + minutes;
		
		cont.find(".ctrl-date-hidden", cont).val(val);
		
		
		
		if( data.selectedFn )
			try
				{window[data.selectedFn]( val );}
			catch(e){
				alert('Bug w selectedFn');
			}
		
	}
	
	$(".ctrl-form-date-date", container).datepicker({
		dateFormat: "dd-mm-yy",
  	    onSelect: function(dateText, inst) {
			update( $(this) );
		}

	});
	
	$(".ctrl-form-date-hour,.ctrl-form-date-minutes", container).change(function(){
			update( $(this) );
	});


}